<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>

</head>
<body>
<div class="nav index">
    <div class="layui-container">
        <!-- 公司logo -->
        <div class="nav-logo">
            <a href="/client/index">
                <img th:src="@{/my/img/logo_img.png}" alt="北京云易智创科技有限公司">
            </a>
        </div>
        <div class="nav-list">
            <button>
                <span></span><span></span><span></span>
            </button>
            <ul class="layui-nav" id="menu">

            </ul>
        </div>
    </div>
</div>
<script>
    layui.use(['layer', 'form'], function () {
        var layer = layui.layer
        $.ajax({
            url: "/client/allMenu",
            type: "GET",
            dataType: "json",
            success: function (result) {
                var item = '';
                result.forEach(function (value, index) {
                    item += '<li class="layui-nav-item"><a href="' + value.href + '">' + value.title + '</a></li>';
                })
                $("#menu").html(item);
            }
        });
    });
</script>
</body>
</html>